package com.maiji.cloud.entities.community;

import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldIndex;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@Table(name = "com_activity")
@Document(indexName = "community",type = "com_activity")
public class ComActivity {

    @Id
//    @Field(index = FieldIndex.analyzed)
    @TableId
    @Column(name = "act_name", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
    private String actName;

    @Column(name = "status" , type = MySqlTypeConstant.INT, length = 2,defaultValue = "0")
    private Integer status; //0:default,1:热门 2：精选

    @Column(name = "sort" , type = MySqlTypeConstant.INT, length = 2)
    private Integer sort;

    @Column(name = "image_url",type = MySqlTypeConstant.VARCHAR, length = 256)
    private String imageUrl;

    @Column(name = "path",type = MySqlTypeConstant.VARCHAR, length = 100)
    private String path;
}
